function test() {
  let num = 1;
  return new Promise((resolve, reject) => {
    resolve(num);
  });
}

// .then 链式操作
/* test()
.then ((res)=>{
    console.log(res);
    return 100
})
.then ((res) =>{
    console.log(res)
})
 */

function promise(app, num) {
  app(num);
}

function app(num) {
  test(num);
}

function test(num) {
  console.log(num);
}

promise(app, 5);

function promise_t(num) {
  return new Promise((resolve, reject) => {
    resolve(num);
  });
}
